﻿/**
 * IMonAIR: A new open-source library for instant messenger connectivity. <http://code.google.com/p/imonair/>
 *
 * This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
 */
/**
 * @author Andre de Groot <http://www.cmd.tech.nhl.nl/users/groot406/weblog/>
 * @author Piotr Zema <http://felixz.mark-naegeli.com>
 */
package net.imonair.core.connectors {
	import flash.events.IEventDispatcher;
	import flash.text.TextFormat;
	import net.imonair.core.contacts.IMContactList;
	import net.imonair.core.contacts.IIMContact;
	/**
	 * The base interface for IMonAIR connectors.
	 * @playerversion Flash 9
	 * @langversion 3.0
	 * @keyword connector, interface
	 * @see net.imonair.core.events.IIMConnectorEvent
	 * @see net.imonair.core.contacts.IMContactList
	 * @see net.imonair.core.contacts.IIMContact
	 */ 
	public interface IIMConnector extends IEventDispatcher {
		/**
		 * Provides the information wether user is signed in or not. 
		 */
		function get signedIn():Boolean;
        /**
         * Determines the status of the user.
         */
		function get status():String;
		function set status(value:String):void;
        /**
         * Determines the display name of the user.
         */
		function get displayName():String;
		function set displayName(value:String):void;
		/**
		 * Provides the current contact list. 
		 */
		function get contactList():IMContactList;
		/**
		 * Provides a list of all online contacts. 
		 */
		function get onlineContactList():IMContactList;
        /**
         * Connects to msn server.
         * @param userLiveID The user's LiveID.
         * @param userPassword The password for user's LiveID.
         */
		function signIn(id:String, password:String):void;	
        /**
         * Sends a message to a contact.
         * @param contact The receiver contact.
         * @param message The message to be sent.
         * @param textFormat The textFormat of the message; not implemented yet.
         */
		function sendMessage(contact:IIMContact, message:String, textFormat:TextFormat = null):void;
	}
}